import combineRoutes from 'koa-combine-routers'

// import publicRouter from './modules/publicRouter'
// import loginRouter from './modules/loginRouter'
// import userRouter from './modules/userRouter'

const moduleFiles = require.context('./modules', true, /\.js$/)
const modules = moduleFiles.keys().map(path => {
  const value = moduleFiles(path)
  return value.default
}) // keys()返回处理的文件列表
export default combineRoutes(modules)
